/**
 * @演示结构数组
 *
 * @author	 wangshikun <wangshikun2010@gmail.com>
 * @copyright	(c) 2012 wangshikun <wangshikun2010@gmail.com>
 * @license	http://www.opensource.org/licenses/mit-license.php The MIT License
 * @package	default
 * @subpackage	default
 */

#include <stdio.h>

int main(int argc, char *argv[]) {

	struct month {
		int number;
		char name[3];
	};

	const struct month months[12] = {
		{31, {'J', 'a', 'n'}}, {28, {'F','e','b'}},
		{31, {'M', 'a', 'r'}}, {30, {'A','p','r'}},
		{31, {'M', 'a', 'y'}}, {30, {'J','u','a'}},
		{31, {'J', 'u', 'l'}}, {31, {'A','u','g'}},
		{30, {'S', 'e', 'p'}}, {31, {'O','c','t'}},
		{30, {'N', 'o', 'v'}}, {31, {'D','e','c'}}
	};

	for (int i=0; i<12; i++) {
		printf("%c%c%c   %d\n", months[i].name[0], months[i].name[1], months[i].name[2], months[i].number);
	}

	return 0;
}
